interface IConfig {
  /** api域名 */
  apiDomain: string;
  /** kc 域名 */
  // kcDomain?: string;
}
// let kcUrl = 'https://kc.mcisaas.com';
// if (window.location.href.indexOf('dc-dev1') >= 0) {
//   kcUrl = 'https://dev3-kc.mcisaas.com';
// } else if (window.location.href.indexOf('dc-stg1') >= 0) {
//   kcUrl = 'https://stg3-kc.mcisaas.com';
// } else if (window.location.href.indexOf('dc-uat1') >= 0) {
//   kcUrl = 'https://uat1-kc.mcisaas.com';
// } else if (window.location.href.indexOf('localhost') >= 0) {
//   kcUrl = 'https://dev3-kc.mcisaas.com';
// } else if (window.location.href.indexOf('127.0.0.1') >= 0) {
//   kcUrl = 'https://dev3-kc.mcisaas.com';
// }
const config = {
  dev: {
    apiDomain: `http://172.22.11.104:48084/decision` // dev 环境 api url
    // kcDomain: `https://dev3-kc.mcisaas.com` // dev 环境 kc url
  },
  prod: {
    apiDomain: `/decision`
    // kcDomain: kcUrl
  }
} as IRecordValue<IConfig>;

export default config[import.meta.env.TYPE];
export const lang: 'cn' | 'en' | 'hk' = import.meta.env.LANG;
